package com.xoomworks.rsfr.core.service;

import java.util.List;

import com.xoomworks.rsfr.model.TrustedCompany;

/**
 * TrustedCompany Service interface.
 *
 * @author bogdan.sbiera
 */
public interface TrustedCompanyService extends BaseService<TrustedCompany> {

    /**
     * Gets the trust state between 2 companies.
     *
     * @param firstCompanyId
     *            Long
     * @param secondCompanyId
     *            Long
     * @return TrustedCompany
     */
    public TrustedCompany getTrustedCompanyRelationship(Long firstCompanyId, Long secondCompanyId);

    /**
     * Returns all the TrustedCompany objects that include a certain Company and
     * are accepted.
     *
     * @param companyId
     *            the id of the Company for which we search TrustedCompany
     *            objects
     * @return a List of TrustedCompany objects or an empty List if the Company
     *         is not included in any TrustedCompany object
     */
    public List<TrustedCompany> getAllTrustedRelationsByCompanyId(Long companyId);

    /**
     * Returns a list with the ids of the companies that have a trust relation
     * with the Company with id = myCompanyId.
     *
     * @param myCompanyId
     *            the id
     * @return List of ids of the trusted Companies
     */
    public List<Long> getIdOfTrustedCompanies(Long myCompanyId);

}
